package net.lab1024.sa.admin.module.business.wms.stock.dao;

import java.util.List;
import net.lab1024.sa.admin.module.business.wms.stock.domain.entity.StockWarnRuleEntity;
import net.lab1024.sa.admin.module.business.wms.stock.domain.form.StockWarnRuleQueryForm;
import net.lab1024.sa.admin.module.business.wms.stock.domain.vo.StockWarnRuleVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 库存预警规则表 Dao
 *
 * @Author ADog
 * @Date 2025-09-20 16:13:18
 * @Copyright 1.0
 */

@Mapper
public interface StockWarnRuleDao extends BaseMapper<StockWarnRuleEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<StockWarnRuleVO> queryPage(Page page, @Param("queryForm") StockWarnRuleQueryForm queryForm);

    /**
     * 根据预警类型列表和启用状态查询规则
     */
    List<StockWarnRuleVO> findByWarnTypeInAndIsEnabled(@Param("warnTypes") List<Integer> warnTypes,
            @Param("isEnabled") Boolean isEnabled);
}
